#include <bits/stdc++.h>
using namespace std;

const int N = 11;

int n;
int f[1 << N];

void dfs(int l, int r)
{
	if(l > r) return;
	if(l == r)
	{
		int t = f[r] - f[l - 1];
		if(t) cout << "I";
		else cout << "B";
		return;
	}
	int mid = l + r >> 1;
	dfs(l, mid);
	dfs(mid + 1, r);
	int sum = f[r] - f[l - 1];
	if(sum == 0) cout << "B";
	else if(sum == r - l + 1) cout << "I";
	else cout << "F";
}

int main()
{
	cin >> n;
	n = (1 << n);
	for(int i = 1;i <= n;i ++)
	{
		char c; cin >> c;
		f[i] = f[i - 1] + (c == '1' ? 1 : 0);
	}
	dfs(1, n);
	return 0;
}